/**
 * Description: 
 * File: tools.c |Time: 2021-05-13 15:58
 */

#include "tools.h"

int str_ncmp(char *str1, char *str2, int n)
{
    int i;

    for (i = 0; i < n; i++) 
    {
        if (str1[i] != str2[i]) 
        {
            return str1[i] - str2[i];
        }
    }

    return 0;
}

